<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>API生成器代码演示</title>
<link href="../css/bootstrap3.css" rel="stylesheet">
<link href="../css/font-awesome.css" rel="stylesheet">
<link href="../css/koala.css" rel="stylesheet">
<script src="../js/jquery.js" type="text/javascript"></script>
<script src="../lib/Koala_Toggle.js" type="text/javascript"></script>
</head>
<body>
<div class="container" data-role="toggle-container">
<div class="content" data-role="toggle-content">
<pre>
&lt;script type="text/javascript"&gt;
var data = {
    "Tree-树形组件":{
        properties:[
            {"property":"multiSelect","description":"是否允许多选","value":"Boolean","default":"false"},
            {"property":"loadingHTML","description":"载入时显示的html","value":"html字符串","default":""}
        ],methods:[
            {"method":"render","param":"","description":"渲染树","return":""},
            {"method":"isEmpty","param":"obj","description":"判断树是否为空","return":"Boolean"},
            {"method":"createParent","param":"","description":"创建树的父节点","return":""}
        ],events:[
        ]	
    },
    "ComboBox-组合框":{
        properties:[
		],methods:[
            {"method":"selectedItem","param":"","description":"获得选择的数据","return":"String"},
            {"method":"selectByText","param":"text(String)","description":"根据文本框选择","return":""},
            {"method":"selectByValue","param":"value(String)","description":"根据下拉框某个值选择","return":""},
            {"method":"selectByIndex","param":"index(Integer)","description":"根据下拉框某个索引选择","return":""},
            {"method":"selectBySelector","param":"selector(String)","description":"根据某个jQuery选择器语法选择","return":""},
            {"method":"setDefaultSelection","param":"","description":"设置选择默认第一个","return":""},
            {"method":"enable","param":"","description":"设置组合框的文本和按钮可用","return":""},
            {"method":"disable","param":"","description":"设置组合框的文本和按钮不可用","return":""},
        ],events:[
            {"event":"itemclicked","param":"event","description":"下拉框点击事件"},
            {"event":"inputchanged","param":"event,extra","description":"输入文本改变时的事件"},
        ]	
    }
];

$(function(){
	
    $("#default_layout").layout({
        layout:"default",
        centerHeight:450,
        maxHeight:550
    }).apibuilder({
        data:data
    });
	
});

&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id="default_layout"&gt;
    &lt;div id="layout_header" region="north"&gt;各组件接口&lt;/div&gt;
    &lt;div id="layout_left" class="tree" region="west"&gt;&lt;/div&gt;
    &lt;div id="layout_right" region="center"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
</pre>
</div>
</div>
</body>
</html>